import java.io.*;
import java.util.*;

public class TestNumberOutput {
	public static void main(String[] args) {
		RandomIterable rand = new RandomIterable(10000, 1, 1000);
		List<Integer> numbers = new Vector<Integer>();

		for (Integer i : rand) {
			numbers.add(i);
		}

		Set<Integer> set = new HashSet<Integer>(numbers);

		try {
			PrintWriter allWriter = new PrintWriter("all-numbers.txt");
			PrintWriter uniqueWriter = new PrintWriter("unique-numbers.txt");
			//FileOutputStream fos = new FileOutputStream("all-numbers.txt");
			//DataOutputStream dos = new DataOutputStream(fos);
	
			for (Integer i : numbers) {
				allWriter.println(i);
			}

			for (Integer i : set) {
				uniqueWriter.println(i);
			}
	
			//dos.close();
			//fos.close();
			allWriter.close();
			uniqueWriter.close();
		} catch (IOException ex) {
		
		}
	}
}
